package com.javasm.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * 菜单(AdminMenu)实体类
 *
 * @author makejava
 * @since 2025-06-19 15:31:31
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
public class AdminMenu implements Serializable {
    private static final long serialVersionUID = 614592637079013838L;

    private Long mid;
/**
     * 菜单名
     */
    private String menuname;
/**
     * 父id
     */
    private Long pid;
/**
     * 跳转链接
     */
    private String url;
/**
     * 是否显示在导航,1显示,2不显示
     */
    private Integer show;
/**
     * 图标
     */
    private String glyphicon;


    //菜单中包含子菜单
    private List<AdminMenu> subMenu;

    //上级名称
    private String pname;

    public AdminMenu(String menuname, Long pid) {
        this.menuname = menuname;
        this.pid = pid;
    }

    public AdminMenu(Long mid, String menuname, Long pid, String url, String glyphicon) {
        this.mid = mid;
        this.menuname = menuname;
        this.pid = pid;
        this.url = url;
        this.glyphicon = glyphicon;
    }
}

